import request from '@/utils/request'

export const exerciseList = (search) =>
  request({
    url: '/exercise',
    method: 'get',
    params: {
      encode: search.encode,
      offset: search.offset,
      limit: search.limit
    }
  })
export const saveExercise = (exercise) =>
  request({
    url: '/exercise/add',
    method: 'post',
    data: exercise
  })
export const updateExercise = (id, exercise) =>
  request({
    url: '/exercise/' + id,
    method: 'put',
    data: exercise
  })
export const removeExercise = (id) =>
  request({
    url: '/exercise/' + id,
    method: 'delete'
  })

